package com.printhelper.dto;

import java.util.Objects;

public class AuthResponse {
    
    private String token;
    private String username;
    private String message;
    private boolean success;
    
    public AuthResponse() {
    }
    
    public AuthResponse(String token, String username, String message, boolean success) {
        this.token = token;
        this.username = username;
        this.message = message;
        this.success = success;
    }
    
    // Getters and Setters
    public String getToken() {
        return token;
    }
    
    public void setToken(String token) {
        this.token = token;
    }
    
    public String getUsername() {
        return username;
    }
    
    public void setUsername(String username) {
        this.username = username;
    }
    
    public String getMessage() {
        return message;
    }
    
    public void setMessage(String message) {
        this.message = message;
    }
    
    public boolean isSuccess() {
        return success;
    }
    
    public void setSuccess(boolean success) {
        this.success = success;
    }
    
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AuthResponse that = (AuthResponse) o;
        return success == that.success && 
               Objects.equals(token, that.token) && 
               Objects.equals(username, that.username) && 
               Objects.equals(message, that.message);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(token, username, message, success);
    }
    
    @Override
    public String toString() {
        return "AuthResponse{" +
                "token='[PROTECTED]'" +
                ", username='" + username + '\'' +
                ", message='" + message + '\'' +
                ", success=" + success +
                '}';
    }
} 